package com.jinhua.batch.constant;

import java.util.ArrayList;
import java.util.List;
/**
 * Copyright
 *
 * @Author WuHuang
 * @Date 2023/3/31
 */
public enum StageEnum {
    TO_BE_DISPATCH("等待调度"),
    RETRIEVING_UPLOAD_FILE("正在获取用户上传文件"),
    BATCH_PROCESSING("正在批量处理"),
    SAVING_PROCESS_RESULT("正在保存处理结果"),
    FINISH("处理完成"),
    EXCEPTION_INTERRUPT("异常中断");

    private String desc;
    private static List<String> normalStageDescList = new ArrayList();

    public static List<String> getNormalStageDescList() {
        return normalStageDescList;
    }

    private StageEnum(final String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return this.desc;
    }

    static {
        normalStageDescList.add(TO_BE_DISPATCH.getDesc());
        normalStageDescList.add(RETRIEVING_UPLOAD_FILE.getDesc());
        normalStageDescList.add(BATCH_PROCESSING.getDesc());
        normalStageDescList.add(SAVING_PROCESS_RESULT.getDesc());
        normalStageDescList.add(FINISH.getDesc());
    }
}
